package com.xyb.utils;

/**
 * 字符串工具类
 */
public class StringUtils {

    /**
     * 去除字符串最后几个字符
     * @param str
     * @param length
     * @return
     */
    public static String removeTheLastString(String str,int length){
        return str.substring(0, str.length() - length);
    }

    public static void main(String[] args) {
        String abc = removeTheLastString("abc", 2);
        System.out.println("abc = " + abc);
    }
}
